package com.faiz.example.springtest.config;

import com.faiz.example.springtest.plugin.InsertPlugin;
import org.apache.ibatis.plugin.Interceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisConfig {

    @Bean
    public Interceptor[] interceptors(){
         //创建ParameterInterceptor这个插件
        InsertPlugin parameterInterceptor = new InsertPlugin();
         //放入数组返回
        return new Interceptor[]{parameterInterceptor};
    }

}

